package me.jiatao.viewmodel.custom

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider

class ArgViewModelFactory(private val argStr: String) : ViewModelProvider.Factory {
    override fun <T : ViewModel?> create(modelClass: Class<T>): T {
        return modelClass.getConstructor(String::class.java)
            .newInstance(argStr)
    }
}